{literal}
<script  languaje="javascript" type="text/javascript">
	function changeFields(){
		var ID=document.form01.mainType.options[document.form01.mainType.selectedIndex].value;
		if(ID == 1000 || ID == 1001 || ID == 1002 || ID == -1 ){
			document.getElementById('tr01').style.visibility='';
			document.getElementById('tr02').style.visibility='';			
			
			document.getElementById('tr06').style.visibility='';
			document.getElementById('tr07').style.visibility='';
		}else{
			var obj= document.getElementById('avisos');			
			document.getElementById('tr01').style.visibility='hidden';
			document.getElementById('tr02').style.visibility='hidden';		
			
			document.getElementById('tr06').style.visibility='hidden';
			document.getElementById('tr07').style.visibility='hidden';
		}
	}
	jQuery(document).ready(changeFields);
</script>
{/literal}
<a href='?'>Create new</a><br><br>
<table class="noBorder"><tr><td valign="top" class="no_border">
{foreach item=user from=$package_list}
{if $user.pid ==99} # 0. {else} # {$user.pid}.{/if} <a href='?pid={$user.pid}'>{$user.pname}</a><br>
 {if $user.counter==3}
 	</td><td valign="top">
 {/if}
{/foreach}
</td></tr></table>






<p>{$message}</p>




<form method="post" action="adm_package_edit.php" name="form01">
<input type="hidden" name="update" value="{$update}">
<input type="hidden" name="pid" value="{$pid}">





<table width="100%" class="noBorder">
<tr><td colspan="2"><b>Main Details</b></td></tr>
<tr>
	<td>Tipo de Operaci&oacute;n</td>
	<td><select name="mainType" onchange="javascript:changeFields();" >
			<option value="{$smarty.const.ID_CAT_COMPRA}"    {if $mainType==$smarty.const.ID_CAT_COMPRA OR $mainType==0}   selected="selected"{/if}>Compra</option>
			<option value="{$smarty.const.ID_CAT_ALQUILER}"  {if $mainType==$smarty.const.ID_CAT_ALQUILER} selected="selected"{/if}>Alquiler</option>
			<option value="{$smarty.const.ID_CAT_SERVICIOS}" {if $mainType==$smarty.const.ID_CAT_SERVICIOS} selected="selected"{/if}>Servicios</option>
			<option value="-1" {if $mainType==-1} selected="selected"{/if}>Compra:Desmantelados</option>
			<option value="{$smarty.const.ID_CAT_COMPRA_AUX}"    {if $mainType==$smarty.const.ID_CAT_COMPRA_AUX}    selected="selected"{/if}>Compra Extra</option>
			<option value="{$smarty.const.ID_CAT_ALQUILER_AUX}"  {if $mainType==$smarty.const.ID_CAT_ALQUILER_AUX}  selected="selected"{/if}>Alquiler Extra</option>
			<option value="{$smarty.const.ID_CAT_SERVICIOS_AUX}" {if $mainType==$smarty.const.ID_CAT_SERVICIOS_AUX} selected="selected"{/if}>Servicios Extra</option>
		</select>
		{*Nota: Los paquetes extra solo funcionan con Resaltado.*}	
	</td>
</tr>
<tr><td>Nombre de Paquete</td><td><input type='text' name='pname' value='{$pname}' size="40"></td></tr>
<tr style="display: none;"><td>Payment Term</td><td>
<input type='radio' name='pterm' value='1'{if $pterm==1} checked{/if}> Membership  
<input type='radio' name='pterm' value='2'{if $pterm==2} checked{/if}> Credits
</td></tr>
<tr><td>Duraci&oacute;n</td><td><input type='text' name='pdur' value='{$pdur}' size="1"> d&iacute;as de expiraci&oacute;n</td></tr>
<tr id="tr01"><td>Avisos</td><td><input type='text' name='avisos' id='avisos' value='{$avisos}' size="1"> Cantidad de Avisos</td></tr>

<tr id="tr02">
	<td>Concesionaria</td>
	<td>
		<input type='radio' name='concesionaria' value='0'{if $concesionaria==0} checked="checked"{/if}> Usuario  
		<input type='radio' name='concesionaria' value='1'{if $concesionaria==1} checked="checked"{/if}> Concesionaria
	</td>
</tr>
<tr><td>Show Package?</td><td><input type='radio' name='pactive' value='1'{if $pactive==1} checked{/if}> Yes  <input type='radio' name='pactive' value='2'{if $pactive==2} checked{/if}> No</td></tr>
<tr id="tr03"><td>Price</td><td><input type='text' name='pprice' value='{$pprice}' size="5"> </td></tr>
<tr id="tr04"><td>Currency</td><td><input type='text' name='pcurrency' value='{$pcurrency}' size="5"> </td></tr>
<tr><td colspan="2"><b>Features Included</b></td></tr>
<tr id="tr05"><td>Upload Images</td><td><input type='text' name='pupload' value='{$pupload}' size="5"> Total number of pictures</td></tr>
<tr id="tr06"><td>Upload Videos</td><td><input type='text' name='pmatch' value='{$pmatch}' size="5"> Total number of videos</td></tr>
<tr><td>Bold ad title</td><td><input type='text' name='pmessages' value='{$pmessages}' size="5"> Makes ads special (Number of ads with bold title)</td></tr>
<tr><td>Premium ad</td><td><input type='text' name='ppremium' value='{$ppremium}' size="5"> Makes premium ads  (Number of ads in extra list)</td></tr>
<tr id="tr07"><td>Vendor URL/logo</td><td><input type='text' name='pgb' value='{$pgb}' size="5"> 1=On, 0=Off </td></tr>
<!--
<tr><td>Image Rotation</td><td><input type='text' name='protation' value='{$protation}' size="5"> Rotate image on frontpage?</td></tr>
<tr><td>Visit List</td><td><input type='text' name='pvisitor' value='{$pvisitor}' size="5"> How many visitors on visit-list?</td></tr>
<tr><td>Favorites List</td><td><input type='text' name='pfav' value='{$pfav}' size="5"> How many favorites?</td></tr>
<tr><td>Match List</td><td><input type='text' name='pmatch' value='{$pmatch}' size="5"> How many matches?</td></tr>
<tr><td>Flirts</td><td><input type='text' name='pflirts' value='{$pflirts}' size="5"> How many flirts?</td></tr>
-->
<tr><td>Action</td><td align="right">

{if $update}
	<input type="submit" name="submit" value="Update Package">
	<input type="submit" name="del" value="Delete">
{else}
	<input type="submit" name="submit" value="Create Package">
{/if}

</td></tr>
</table>
</form>